<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<meta charset="UTF-8">
	<title>LarryBlogCMS-Home</title>
  <meta name="renderer" content="webkit"> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">  
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> 
  <meta name="apple-mobile-web-app-status-bar-style" content="black"> 
  <meta name="apple-mobile-web-app-capable" content="yes">  
  <meta name="format-detection" content="telephone=no"> 
	<link rel="stylesheet" type="text/css" href="myconfig/layui/css/layui.css" media="all">
	<link rel="stylesheet" type="text/css" href="myconfig/bootstrap/css/bootstrap.min.css" media="all">
	<link rel="stylesheet" type="text/css" href="common/global.css">
	<link rel="stylesheet" type="text/css" href="css/main.css" media="all">
</head>
<body>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="myconfig/bootstrap/js/bootstrap.min.js"></script>

<section class="larry-wrapper">
		<div class="col-lg-12">
          <!-- 系统公告 -->
             <section class="panel">
                 <header class="panel-heading bm0">
                        <span class='span-title'>系统公告</span>
                        <span class="tools pull-right"><a href="javascript:;" class="iconpx-chevron-down"></a></span>
                  </header>
                  <div class="panel-body">
                      <table id="notice" lay-filter="noticeTest" style="width:100%"></table>
                  </div>
             </section>
		</div>
	</div>

</section>

<script type="text/javascript" src="myconfig/layui/layui.js"></script>
<script type="text/javascript">
	layui.use(['jquery','layer','element'],function(){
		window.jQuery = window.$ = layui.jquery;
		window.layer = layui.layer;
        window.element = layui.element;

       $('.panel .tools .iconpx-chevron-down').click(function(){
       	   var el = $(this).parents(".panel").children(".panel-body");
       	   if($(this).hasClass("iconpx-chevron-down")){
       	   	   $(this).removeClass("iconpx-chevron-down").addClass("iconpx-chevron-up");
       	   	   el.slideUp(200);
       	   }else{
       	   	   $(this).removeClass("iconpx-chevron-up").addClass("iconpx-chevron-down");
       	   	   el.slideDown(200);
       	   }
       })

	});
</script>
<script type="text/javascript" src="jsplug/echarts.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<script th:inline="none">
    layui.use('table', function(){
        var table = layui.table;
        //第一个实例
        table.render({
            elem: '#notice'
            ,id:'noticeTest'
            ,height:480
            ,url: 'notice/findAll' //数据接口
            ,page: true //开启分页
            ,limits:[5,10,15,20]
            ,limit:10
            ,cols: [[ //表头
                {field: 'noticeId', title: '公告ID',align:'center', Width:'10%',sort: true}
                ,{field: 'user', title: '公告发布人',align:'center',width:'10%',templet:'<div>{{d.user.userName}}</div>'}
                ,{field: 'noticeTitle', title: '公告标题',align:'center', width:'15%', sort: true}
                ,{field: 'noticeTime', title: '发布时间',align:'center',width:'15%'}
                ,{field: 'noticeContent', title: '公告内容',align:'center',width:'35%'}
                ,{field: 'department', title: '所属部门',align:'center',width:'15%',templet:'<div>{{d.department.departmentName}}</div>'}
            ]]
        });

    });
</script>
</body>
</html>